import { createStore } from 'vuex'

export default createStore({
  state: {
    status:"teacher",
    stuId:'',
    classId:'',
    name:''
  },
  mutations: {
    switchstatus(state) {
      if (state.status =="teacher"){
        state.status = "student"
      }else {
        state.status = "teacher"
      }
    },
    changestuId(state,id){
        state.stuId = id
    },
    changecId(state,id){
      state.classId = id
    },
    adminname(state,name){
      state.name = name
    }
  },
  actions: {

  },
  modules: {
  }
})
